package com.igo.util;

import lombok.Data;

import java.time.LocalDateTime;

@Data
public class MinuteRangeCalculator {

    private final LocalDateTime start;
    private final LocalDateTime end;

    public static MinuteRangeCalculator calculateMinuteRange(int year, int month, int day, int hour, int minute) {
        LocalDateTime start = LocalDateTime.of(year, month, day, hour, minute, 0);
        LocalDateTime end = LocalDateTime.of(year, month, day, hour, minute, 59);
        return new MinuteRangeCalculator(start, end);
    }

    public MinuteRangeCalculator(LocalDateTime start, LocalDateTime end) {
        this.start = start;
        this.end = end;
    }
}